USE [phatphuclocapp]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE sp_HangHoa_Update
	@id int,
	@ten nvarchar(80),
	@ma_hang nvarchar(50),
	@ma_nhom_hang int,
	@ghi_chu nvarchar(80),
	@gia_nhap float
AS
BEGIN
	DECLARE @ngay_cap_nhat_cuoi datetime
	SET @ngay_cap_nhat_cuoi = getdate()

	update hanghoa set 
					    ten=@ten,
						ma_hang=@ma_hang,
						ma_nhom_hang=@ma_nhom_hang,
						ghi_chu=@ghi_chu,
						gia_nhap=@gia_nhap,
						ngay_cap_nhat_cuoi=@ngay_cap_nhat_cuoi
					where
						id=@id
END
GO


